#!/bin/sh

if [[ $# < 1 ]]; then
	echo "too few agr"
	echo "use like: sh ssh_jodo.sh billing"
	exit
fi

host=$1
ip=

if [[ $host = "tw-billing" ]]; then
	ip="52.74.77.27"
elif [[ $host = "tw-01" ]]; then
	ip="52.76.120.199"
elif [[ $host = "tw-test" ]]; then
	ip="52.76.43.3"
elif [[ $host = "tw-02" ]]; then
	ip="52.76.147.179"
elif [[ $host = "tw-03" ]]; then
	ip="52.76.147.116"
elif [[ $host = "en-01" ]]; then
	ip="52.76.147.140"
elif [[ $host = "en-02" ]]; then
	ip="52.76.147.202"
elif [[ $host = "en-03" ]]; then
	ip="52.76.145.97"
elif [[ $host = "en-test" ]]; then
	ip="52.76.147.139"
fi	

echo "'root' @ '$ip'"

if [[ $ip != "" ]]; then
	ssh -i jodo_guajipikaqiu_test_key.pem root@$ip
fi

exit
